public class Test {
    public static void main(String[] args) {
        char[] ch={'c','b','a','c','d'};
        int[] count=new int[26];
        for (int i = 0; i < ch.length; i++) {
            count[ch[i]-'a']++;
        }
        for (int i = 0; i < ch.length; i++) {
            if(  count[ch[i]-'a']==1){
                System.out.println(i);
                return;
            }

        }
    }
}
